package com.tsd.wxpay.vo;

import com.alibaba.fastjson.JSON;

/**
 * @ClassName: SceneInfoVo
 * @Description: TODO
 * @Author: Hillpool
 * @Date: 2022/7/14 10:22
 * @Version: 1.0
 */
public class SceneInfoVo {

    public static final String TYPE_ANDROID = "Android";
    public static final String TYPE_IOS = "IOS";
    public static final String TYPE_WAP = "Wap";

    private SceneInfoVo h5_info;

    private SceneInfoVo store_info;

    /**
     * 场景类型
     */
    private String type;

    /**
     * 应用名
     */
    private String app_name;

    /**
     * IOS移动应用
     */
    private String bundle_id;

    /**
     * 安卓移动应用
     */
    private String package_name;

    /**
     * WAP网站应用：WAP网站URL地址
     */
    private String wap_url;

    /**
     * WAP网站应用：WAP网站名
     */
    private String wap_name;

    /**
     * 门店信息：门店ID
     */
    private String id;

    /**
     * 门店信息：门店名称
     */
    private String name;

    /**
     * 门店信息：门店所在地行政区划码
     */
    private String area_code;

    /**
     * 门店信息：门店地址
     */
    private String address;

    public SceneInfoVo getH5_info() {
        return h5_info;
    }

    public void setH5_info(SceneInfoVo h5_info) {
        this.h5_info = h5_info;
    }

    public SceneInfoVo getStore_info() {
        return store_info;
    }

    public void setStore_info(SceneInfoVo store_info) {
        this.store_info = store_info;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getApp_name() {
        return app_name;
    }

    public void setApp_name(String app_name) {
        this.app_name = app_name;
    }

    public String getBundle_id() {
        return bundle_id;
    }

    public void setBundle_id(String bundle_id) {
        this.bundle_id = bundle_id;
    }

    public String getPackage_name() {
        return package_name;
    }

    public void setPackage_name(String package_name) {
        this.package_name = package_name;
    }

    public String getWap_url() {
        return wap_url;
    }

    public void setWap_url(String wap_url) {
        this.wap_url = wap_url;
    }

    public String getWap_name() {
        return wap_name;
    }

    public void setWap_name(String wap_name) {
        this.wap_name = wap_name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getArea_code() {
        return area_code;
    }

    public void setArea_code(String area_code) {
        this.area_code = area_code;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String toJsonString() {
        return JSON.toJSONString(this);
    }

    public static SceneInfoVo genAndroid(String app_name, String package_name) {
        SceneInfoVo infoVo = new SceneInfoVo();
        SceneInfoVo vo = new SceneInfoVo();
        vo.setType(TYPE_ANDROID);
        vo.setApp_name(app_name);
        vo.setPackage_name(package_name);
        infoVo.setH5_info(vo);
        return infoVo;
    }

    public static SceneInfoVo genIos(String app_name, String bundle_id) {
        SceneInfoVo infoVo = new SceneInfoVo();
        SceneInfoVo vo = new SceneInfoVo();
        vo.setType(TYPE_IOS);
        vo.setApp_name(app_name);
        vo.setBundle_id(bundle_id);
        infoVo.setH5_info(vo);
        return infoVo;
    }

    public static SceneInfoVo genWap(String wap_url, String wap_name) {
        SceneInfoVo infoVo = new SceneInfoVo();
        SceneInfoVo vo = new SceneInfoVo();
        vo.setType(TYPE_WAP);
        vo.setWap_url(wap_url);
        vo.setWap_name(wap_name);
        infoVo.setH5_info(vo);
        return infoVo;
    }

    public static SceneInfoVo genStore(String id, String name, String area_code, String address) {
        SceneInfoVo infoVo = new SceneInfoVo();
        SceneInfoVo vo = new SceneInfoVo();
        vo.setId(id);
        vo.setName(name);
        vo.setArea_code(area_code);
        vo.setAddress(address);
        infoVo.setStore_info(vo);
        return infoVo;
    }
}
